
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.Employee;
import com.cmc.dao.EmployeeDao;
import com.cmc.service.EmployeeManager;
/*
* @aegis.mapping
*/
public class EmployeeManagerImpl extends BaseManager implements EmployeeManager {
    private EmployeeDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setEmployeeDao(EmployeeDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.EmployeeManager#getEmployees(com.cmc.model.Employee)
     */
    public List getEmployees(final Employee employee) {
        return dao.getEmployees(employee);
    }

    /**
     * @see com.cmc.service.EmployeeManager#getEmployee(String id)
     */
    public Employee getEmployee(final String id) {
        return dao.getEmployee(new Long(id));
    }

    /**
     * @see com.cmc.service.EmployeeManager#saveEmployee(Employee employee)
     */
    public void saveEmployee(Employee employee) {
        dao.saveEmployee(employee);
    }

    /**
     * @see com.cmc.service.EmployeeManager#removeEmployee(String id)
     */
    public void removeEmployee(final String id) {
        dao.removeEmployee(new Long(id));
    }
}
